package com.sky.service.impl;

import com.sky.domain.LoginForm;
import com.sky.domain.Student;
import com.sky.mapper.StudentMapper;
import com.sky.service.StudentService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

/**
 * @author 尹稳健~
 * @version 1.0
 */
@Service
@Transactional
public class StudentServiceImpl implements StudentService {

    @Autowired
    private StudentMapper studentMapper;


    public Student login(LoginForm loginForm) {
        return studentMapper.login(loginForm);
    }

    public List<Student> getStudentList(Student student) {
        return studentMapper.getStudentList(student);
    }

    public void addStudent(Student student) {
        studentMapper.addStudent(student);
    }

    public Student findBySno(Student student) {
        return studentMapper.findBySno(student);
    }

    public void editStudent(Student student) {
        studentMapper.editStudent(student);
    }

    public void deleteStudent(Integer[] ids) {
        studentMapper.deleteStudent(ids);
    }

    public void updatePassword(Student student) {
        studentMapper.updatePassword(student);
    }
}
